<?php
class system_nav_crumbs {
	
	protected $_page = array();
	/**
	 * @return system_nav_crumbs
	 */
	public function addPage(system_nav_page $page) {
		$hash = spl_object_hash($page);
		$this->_page[$hash] = $page;
		return $this;
	}
	
	public function getPages() {
		return $this->_page;
	}
	
	protected $_ads = array();
	/**
	 * @return system_nav_crumbs
	 */
	public function addAdvertise(system_nav_advertise $ads) {
		$this->_ads[$ads->getHash()] = $ads;
		return $this;
	}
	
	public function getAdvertises() {
		return $this->_ads;
	}
	
	public function __construct() {
		
	}
	
	protected static $_instance;
	static public function getInstance() {
		if(!isset(self::$_instance)) {
			self::$_instance = new self();
		}
		return self::$_instance;
	}
	
}